package com.daijie.demo

import io.reactivex.disposables.CompositeDisposable
import io.reactivex.disposables.Disposable

class IDisposablesImpl : IDisposables {

    override fun add(subscription: Disposable) {
        compositeSubscription.add(subscription)
    }

    override fun unsubscribe() {
        compositeSubscription.dispose()
    }

    private val compositeSubscription = CompositeDisposable()
}